package cn.com.zhuxulin.android.demos.activities;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import cn.com.zhuxulin.android.demos.R;

public class UseXMLArray extends Activity {
	private String[] string = null;
	private int[] integer = null;
	private TextView array = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.use_array);
		array = (TextView) findViewById(R.id.array);
		string = getResources().getStringArray(R.array.string);
		integer = getResources().getIntArray(R.array.integer);
	}

	@Override
	protected void onStart() {
		super.onStart();
		String tmp = " ";
		for (int i = 0; i < string.length; i++) {
			tmp = "I=" + i + " " + string[i] + " " + integer[i] + tmp;
		}
		array.setText(tmp);
	}
}
